#!/bin/sh
if [ "${POSTUREPATH}" == "" ]; then
  echo "缺少POSTUREPATH配置 (You missed the configuration of POSTUREPATH)"
  exit 1
fi
. $POSTUREPATH/include/function.sh

branchName=$(git symbolic-ref --short -q HEAD)
commitId=$(git log -1 HEAD --pretty=format:"%h")
commitMsg=$(git log -1 HEAD --pretty=format:"%s" | sed s/[[:space:]]//g)
commitUser=$(git log -1 HEAD --pretty=format:"%cn" | sed s/[[:space:]]//g)
writeCommitLog ${commitUser} ${branchName} ${commitId} ${commitMsg}

exit 1
